home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / pyshared / louie / signal.py < prev    next >
Text File  |  2005-11-29  |  663b  |  31 lines

  1. """Signal class.
  2.  
  3. This class is provided as a way to consistently define and document
  4. signal types.  Signal classes also have a useful string
  5. representation.
  6.  
  7. Louie does not require you to use a subclass of Signal for signals.
  8. """
  9.  
  10.  
  11. class _SIGNAL(type):
  12.     """Base metaclass for signal classes."""
  13.  
  14.     def __str__(cls):
  15.         return '<Signal: %s>' % (cls.__name__, )
  16.  
  17.  
  18. class Signal(object):
  19.  
  20.     __metaclass__ = _SIGNAL
  21.  
  22.  
  23. class All(Signal):
  24.     """Used to represent 'all signals'.
  25.  
  26.     The All class can be used with connect, disconnect, send, or
  27.     sendExact to denote that the signal should react to all signals,
  28.     not just a particular signal.
  29.     """
  30.  
  31.